﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;

namespace ForthSharp.DataTypes
{
    class Integer : DataWord
    {
        protected long _number;
        
        public override string DataType
        {
            get { return "int"; }
        }

        public static implicit operator long(Integer un)
        {
            return un._number;
        }

        public Integer(long l)
        {
            _number = l;
        }

        public static Expression Add(Integer lh, Integer rh)
        {
            return Expression.Add(Expression.Constant(lh._number), Expression.Constant(rh._number));
        }
    }
}
